{extend name="admin@public/base" /}
{block name="main-content"}
	<div class="page-content">
	<link rel="stylesheet" href="__PUBLIC__/bootstrap-select/css/bootstrap-select.min.css">


		<!--主题-->
		<div class="page-header">
			<h1>
				您当前操作
				<small>
					<i class="ace-icon fa fa-angle-double-right"></i>
					操作日志设置
				</small>
			</h1>
		</div>
		<div class="row">
			<div class="col-xs-12">
				<form class="form-horizontal ajaxForm2" name="urlsys" method="post" action="{:url('admin/WebLog/weblog_runset')}">
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 是否开启操作日志：</label>
						<div class="col-sm-9" style="padding-top:5px;">
							<input name="weblog_on" id="weblog_on" {if condition="$web_log.weblog_on"}checked{/if} value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" />
							<span class="lbl"></span>
						</div>
					</div>					
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 不记录模块：</label>
						<div class="col-sm-9">
							<select name="not_log_module[]" id="selectmodule" class="selectpicker" multiple data-width="fit">
							{foreach name="$modules" item="vo"}
							<option>{$vo}</option>
							{/foreach}
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 不记录控制器：</label>
						<div class="col-sm-9">
							<select name="not_log_controller[]" id="selectcontroller" class="selectpicker" multiple data-width="fit" data-size="10" data-selected-text-format="count > 6">
							{foreach name="$modules" item="v"}
							<optgroup label="{$v}模块">
							{notempty name="controllers[$v]"}
								{foreach name="$controllers[$v]" item="vv"}
								<option>{$vv}</option>
								{/foreach}
							{/notempty}
							</optgroup>
							{/foreach}						
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 不记录操作方法：</label>
						<div class="col-sm-9">
							<select name="not_log_action[]" id="selectaction" class="selectpicker" multiple data-width="fit" data-size="10" data-selected-text-format="count > 4">
							{foreach name="$actions" item="v" key="k"}
							<optgroup label="{$k}">
							{foreach name="$v" item="vv"}
							<option>{$k}/{$vv}</option>
							{/foreach}
							</optgroup>
							{/foreach}						
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 不记录数据的方法：</label>
						<div class="col-sm-9">
							<select name="not_log_data[]" id="selectdata" class="selectpicker" multiple data-width="fit" data-size="10" data-selected-text-format="count > 4">
							{foreach name="$actions" item="v" key="k"}
							<optgroup label="{$k}">
							{foreach name="$v" item="vv"}
							<option>{$k}/{$vv}</option>
							{/foreach}
							</optgroup>
							{/foreach}						
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 不记录请求类型：</label>
						<div class="col-sm-9">
							<select name="not_log_request_method[]" id="selectmethod" class="selectpicker" multiple data-width="fit">
							{foreach name="$methods" item="vo"}
							<option>{$vo}</option>
							{/foreach}
							</select>
						</div>
					</div>
					<div class="clearfix form-actions">
						<div class="col-sm-offset-3 col-sm-9">
							<button class="btn btn-info" type="submit">
								<i class="ace-icon fa fa-check bigger-110"></i>
								保存
							</button>

							&nbsp; &nbsp; &nbsp;
							<button class="btn" type="reset">
								<i class="ace-icon fa fa-undo bigger-110"></i>
								重置
							</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div><!-- /.page-content -->
{/block}
{block name="scripts"}
<script src="__PUBLIC__/bootstrap-select/js/bootstrap-select.min.js"></script>
<script>
$('#selectmodule').selectpicker('val',"{$web_log.not_log_module}".split(','));
$('#selectcontroller').selectpicker('val',"{$web_log.not_log_controller}".split(','));
$('#selectaction').selectpicker('val',"{$web_log.not_log_action}".split(','));
$('#selectdata').selectpicker('val',"{$web_log.not_log_data}".split(','));
$('#selectmethod').selectpicker('val',"{$web_log.not_log_request_method}".split(','));
</script>
{/block}


